@layer utilities {
  .content-auto {
    content-visibility: auto;
  }
  .video-container {
    /* 移除固定宽高比，允许根据视频内容调整 */
    max-width: 100vw; /* 最大不超过视窗宽度 */
    max-height: 100vh; /* 最大不超过视窗高度 */
    /* 移除最小宽度限制，允许容器在小屏幕设备上更好地适应 */
    /* 添加过渡动画使尺寸变化更平滑 */
    transition: width 0.3s ease, height 0.3s ease;
    /* 使用Flexbox确保容器居中并填充可用空间 */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 全屏模式下的视频容器 */
  .video-container.fullscreen {
    max-width: none;
    max-height: none;
    min-width: 0;
  }
  .gradient-overlay {
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(0, 0, 0, 0.7) 100%
    );
  }
  .swipe-indicator {
    animation: bounce 1.5s infinite;
  }
  /* 添加按钮边框样式，确保在任何背景下都可见 */
  .control-button {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }
  .control-button:hover {
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
  
  /* 视频进度条样式 */
  #progressContainer {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
  }

  #progressContainer.show {
    opacity: 1;
  }

  #progressContainer:hover {
    opacity: 1;
  }

  .progress-bar {
    height: 100%;
    background-color: #ef4444; /* red-500 */
    width: 0%;
    position: relative;
    transition: height 0.2s ease;
  }

  #progressContainer:hover .progress-bar {
    height: 6px;
  }

  .progress-handle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  #progressContainer.show .progress-handle {
    opacity: 1;
  }

  #progressContainer:hover .progress-handle {
    opacity: 1;
  }

  #progressContainer.dragging .progress-handle {
    opacity: 1;
    transform: translate(50%, -50%) scale(1.2);
  }
  
  /* 添加淡入淡出动画类 */
  .fade-in {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
  }
  
  .fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }
  
  /* 新的加载动画样式 */
  .loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    animation: spin 1s linear infinite;
  }
  
  .loading-spinner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 5px solid transparent;
    border-top-color: #fe2c55;
    animation: spin 1.5s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* 新的脉冲加载动画 */
  .pulse-loader {
    width: 48px;
    height: 48px;
    position: relative;
  }
  
  .pulse-loader-dot {
    width: 12px;
    height: 12px;
    background-color: #fe2c55;
    border-radius: 50%;
    position: absolute;
    animation: pulse 2s ease-in-out infinite;
  }
  
  .pulse-loader-dot:nth-child(1) {
    top: 0;
    left: 0;
  }
  
  .pulse-loader-dot:nth-child(2) {
    top: 0;
    right: 0;
    animation-delay: 0.5s;
  }
  
  .pulse-loader-dot:nth-child(3) {
    bottom: 0;
    right: 0;
    animation-delay: 1s;
  }
  
  .pulse-loader-dot:nth-child(4) {
    bottom: 0;
    left: 0;
    animation-delay: 1.5s;
  }
  
  @keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
  }
  
  /* 添加滑动动画类 */
  .slide-up-enter {
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  }
  
  .slide-up-enter-active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .slide-down-exit {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
  }
  
  .slide-down-exit-active {
    transform: translateY(100%);
    opacity: 0;
  }
  
  /* 新增的背景图样式 */
  #backgroundImage {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  #backgroundImage .fa-film {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
}
